<!--
 * @copyri
  components: { PermissionSelectPannel },ght: Huang Ding
 * @Author: ding-cx
 * @Date: 2021-01-08 11:01:21
 * @LastEditors: ding-cx
 * @LastEditTime: 2021-03-20 12:13:05
 * @Description: file content
-->
<template>
  <div>
    <base-crud-table
      ref="crud"
      :option="option"
      :data="data.rows"
      :loading="loading"
      :page="page"
      :permission="crudPermission"
      @refresh="refresh"
      @page-change="pageChange"
      @search-submit="searchSubmit"
      @search-change="searchChange"
      @selection-change="selectionChange"
      @row-dblclick="onRowDblclick"
      @add-submit="addSubmit"
      @row-edit-submit="rowEditSubmit"
      @row-del="rowDel"
      :before-open-dialog="beforeOpenDialog"
      @dialog-open="onDialogOpen"
    >
      <template #headerMenuLeft="">
        <el-button
          v-permission="'sys:role:batchPerm'"
          type="success"
          :size="dingAdminConfig.elsize"
          icon="el-icon-plus"
          @click="dialogBatchPermOpen"
          >批量设置权限</el-button
        >
      </template>

      <!-- 
      <template #form-perm_setting>
          <permission-select-pannel
          style="margin: 0px; padding: 8px"
          :init-check-list="crudInitCheckList"
          @check="checkGetDataList"
        ></permission-select-pannel>
      </template>
         -->
    </base-crud-table>

    <el-dialog
      title="角色权限管理"
      :visible.sync="dialogBatchPermVisible"
      width="65%"
      top="40px"
      @open="batchDialogOpen"
    >
      <div>
        <permission-select-pannel
          ref="permissonSelectPannelRef"
        ></permission-select-pannel>
      </div>
      <div slot="footer">
        <el-button
          @click="dialogBatchPermVisible = false"
          icon="el-icon-circle-close"
          :size="dingAdminConfig.elsize"
          >取 消</el-button
        >
        <el-button
          type="primary"
          @click="dialogSaveBtn"
          icon="el-icon-circle-check"
          :size="dingAdminConfig.elsize"
          >保存</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>

<script src="./setup.js">
</script>

<style>
</style>